package com.cloudfun.campusshare.repo;

import com.cloudfun.campusshare.entity.DeviceAlarmEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by Huqin on 2019/12/26
 */
public interface DeviceAlarmRepo extends
        PagingAndSortingRepository<DeviceAlarmEntity, String>,
        JpaSpecificationExecutor<DeviceAlarmEntity> {

    List<DeviceAlarmEntity> findAllByDeviceIdAndValid(String deviceId, Boolean valid);

    DeviceAlarmEntity findByDeviceIdAndAlarmName(String deviceId, String alarmName);
}
